Namespace Aricie.DNN.Services.Url.FriendlyUrl
    Public Class FriendlyValidationCallBackInfo
        Inherits Aricie.DNN.Services.Caching.ValidationCallBackInfo

        Public Sub New()
            MyBase.New()
        End Sub

        Public Sub New(ByVal objTimestamp As DateTime, ByVal setExpiration As Boolean, ByVal objExpires As DateTime)
            MyBase.New(objTimestamp, setExpiration, objExpires)
        End Sub

        Public Property FriendlyUrl As String = ""


        Public Overrides Function ValidateCacheCallback(context As HttpContext) As HttpValidationStatus
            If Me.FriendlyUrl <> "" Then
                Dim fupContext As FriendlierUrlContext = FriendlierUrlContext.Instance()
                If fupContext.PreRewriteUri.AbsoluteUri <> Me.FriendlyUrl Then
                    Return HttpValidationStatus.IgnoreThisRequest
                End If
            End If
            Return MyBase.ValidateCacheCallback(context)
        End Function

    End Class
End NameSpace